package com.example.finalapp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class SplitActionBarActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_split_action_bar);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater menuInflater = getMenuInflater();
        menuInflater.inflate(R.menu.split_action_bar, menu);
        return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch(item.getItemId()){
        case R.id.itemid_1:
        {
        	Intent intent = new Intent(SplitActionBarActivity.this, MainActivity.class);
        	startActivity(intent);
        }
        case R.id.itemid_2:
        {
        	Intent intent = new Intent(SplitActionBarActivity.this, MainActivity.class);
        	startActivity(intent);
        }
     
    }
    return super.onOptionsItemSelected(item);
	}
	
	

}


